/**
 * Created by hama on 2016/6/11.
 */
//注册提交表单行为

$('form').submit(function(e){
    e.preventDefault();
    //收集表单的信息
    var data = $(this).serialize();
    $.post('/register',data,function(data){
        $('.modal-body').text(data.message);
        $('.modal').modal('show').on('hidden.bs.modal',function(){
            if(data.code == 'success'){
                location.href='/signin';
            }
        })

    })
})